﻿@using QBWeb.ViewModels
@model IEnumerable<QBWeb.Models.TestFolder.AnswerRecordTb>
@{
    ViewBag.Title = "批阅";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var count = 0;
}

<h2>批阅试卷</h2>
<div style="float:right;margin-bottom:10px;">
    <button type="button" onclick="goOut()" class="btn btn-default">返回</button>
</div>
<table class="layui-table">
    <thead>
        <tr>
            <th>
                ID
            </th>
            <th>
                @Html.DisplayNameFor(model => model.StudentName)
            </th>
            <th>
                分数
            </th>
            <th>
               
                @Html.DisplayNameFor(model => model.Status)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
    @foreach (var item in Model)
    {
        count++;
        <tr>
            <td>
                @count
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.StudentName)
            </td>
            <td>
                @foreach (var i in (List<Temp>)ViewBag.data)
                {
                    if(i.UserName==item.StudentName)
                    {
                        @i.Score
                        break;
                    }
                    
                }
            </td>
            <td>
                @if (item.Status == 0)
                {
                <span>未审阅</span>
                }
                else
                {
                    <span>已审阅</span>
                }
            </td>
            <td>
                @Html.ActionLink("查看", "ReviewPaperDetail", new {id = item.TestId,name=item.StudentName})
            </td>
        </tr>

    }
    </tbody>
</table>
<script>
    function goOut() {
        history.go(-1);
    }
</script>